<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>火狐切换搜索的功能</title>
	</head>
	<style>
		#sou{
			text-decoration: none;
			color: white;
			font-size: 12px;
			background-color: #3399FF;
			padding-left: 25px;
			padding-right: 25px;
			padding-bottom: 3.5px;
			padding-top: 4px;
		}
		#kuang{
			border: 1px solid #3399FF;
			height: 20.5px;
		}
		form{
			text-align: center;
		}
		#xu{
			margin-right:80px;
		}
	</style>
	<script>
		function choose(){
			var su=document.getElementsByName("xuan");
			var img=document.getElementById("image");
			if(su[1].checked){
				img.setAttribute("src","images/google_web-444.png");
			}else if(su[2].checked){
				img.setAttribute("src","images/taobao_shopping-446.png");
			}else if(su[0].checked){
				img.setAttribute("src","images/baidu_web.png");
			}
		}
	</script>
	<body>
		<div>
			<form>
				<p > 
					<img src="images/baidu_web.png" id="image"/>
					<input type="text" name="sousuo" size="40px" id="kuang"/><a href="#" id="sou">搜索<a/>
				<p/>
				<p id="xu">
					<input type="radio" name="xuan" value="百度" checked="checked"/>百度
					<input type="radio" name="xuan" value="谷歌" onclick="choose()"/>谷歌
					<input type="radio" name="xuan" value="淘宝" onclick="choose()"/>淘宝
				</p>				
			</form>
		</div>
	</body>
</html>
